from app import app

# 1、定义中间件函数：准备一个过滤网
@app.before_request
def before_request_func():
    print("Before request")


# 2、挂在应用：像是把过滤网放在水龙头下
@app.after_request
def after_request_func(response):
    print("After request")
    return response